#pragma once

class TopoDS_Shape;
class CSelectionSet;
class CAnyView;
class CSketchPlane;

typedef Quantity_NameOfColor COLOR_INDEX;

class CShapeReps;
class GEOMDBAPI CRenderEngine
{
public:
	CRenderEngine(void);
	virtual ~CRenderEngine(void);
	void AttachToLabel(TDF_Label& hLabel);
	Handle_V3d_View AttachToWindow(HWND hWnd);

	void UpdateCurrentViewer();
	void UpdateAllViews();

	void Render(const CShapeReps& shape, bool bUpdate = true);
	void Remove(const CShapeReps& shape, bool bUpdate = true);

	void Hilight(const CShapeReps& shape, bool bUpdate = true);
	void SetColor(const CShapeReps& shape, 
		COLOR_INDEX nColor, bool bUpdate = true);
	void SetTransparency(const CShapeReps& shape, double dValue, 
		bool bUpdate = true);

	CSelectionSet* CreateSelectionSet(CAnyView& view);

	void UpdateGridPlane(const CSketchPlane& skplane);

	Handle_AIS_InteractiveContext GetAIS()
	{
		return m_hContext;
	}
protected:
	Handle_AIS_InteractiveContext m_hContext;
	Handle_V3d_Viewer m_hViewMgr;
};
